---
title: lint
---

import { Badge } from "@astrojs/starlight/components";
import ConfigOption from "@partials/option/config.mdx";
import DependenciesOption from "@partials/option/dependencies.mdx";
import DependencyTypesOption from "@partials/option/dependency-types.mdx";
import HelpOption from "@partials/option/help.mdx";
import LogLevelsOption from "@partials/option/log-levels.mdx";
import NoAnsiOption from "@partials/option/no-ansi.mdx";
import QuoteFilters from "@partials/tips/quote-filters.mdx";
import ShowOption from "@partials/option/show-versions.mdx";
import SortOption from "@partials/option/sort.mdx";
import SourceOption from "@partials/option/source.mdx";
import SpecifierTypesOption from "@partials/option/specifier-types.mdx";

Lint all versions and ranges and exit with 0 or 1 based on whether all files match your Syncpack configuration file.

## Examples

```bash
# Find all issues in "dependencies" or "devDependencies"
syncpack lint --dependency-types prod,dev
# Only lint issues in "react" specifically
syncpack lint --dependencies react
# Look for issues in dependencies containing "react" in the name
syncpack lint --dependencies '**react**'
# Find issues in scoped packages only
syncpack lint --dependencies '@types/**'
# Find issues everywhere except "peerDependencies"
syncpack lint --dependency-types '!peer'
# Only look for issues where an exact version is used (eg "1.2.3")
syncpack lint --specifier-types exact
# Sort dependencies by how many times they are used
syncpack lint --sort count
# See more examples
syncpack lint --help
# See a short summary of options
syncpack lint -h
```

## Options

<QuoteFilters />

### --config <Badge text="<file-path>" />

<ConfigOption command="lint" />

### --dependencies <Badge text="<dependency-name-pattern>" />

<DependenciesOption command="lint" />

### --dependency-types <Badge text="<comma-separated-dependency-type-names>" />

<DependencyTypesOption command="lint" />

### --log-levels <Badge text="<comma-separated-log-level-names>" />

<LogLevelsOption command="lint" />

### --no-ansi

<NoAnsiOption command="lint" />

### --show <Badge text="<comma-separated-detail-names>" />

<ShowOption command="lint" />

### --sort <Badge text="<choice>" />

<SortOption command="lint" />

### --source <Badge text="<file-pattern>" />

<SourceOption command="lint" />

### --specifier-types <Badge text="<comma-separated-specifier-type-names>" />

<SpecifierTypesOption command="lint" />

### --help

<HelpOption command="lint" />
